/*
 * @Author: g05047
 * @Date: 2021-08-30 09:10:03
 * @LastEditors: g05047
 * @LastEditTime: 2021-11-30 14:56:41
 * @Description: file content
 */
import request from "@/utils/request";
let {
	VUE_APP_ADMIN_API,
	VUE_APP_ADMIN_API2,
	VUE_APP_ADMIN_API1,
	VUE_APP_BASE_API_RCJD_ZJG,
} = process.env;
// /获取大屏展示信息
export default {
	getUserInfo: (data) =>
		request.post(`${VUE_APP_ADMIN_API}/backsupport/queryInfo`, data),
	queryInfo: (data) =>
		request.get(`${VUE_APP_ADMIN_API}/backsupport/findOneHeader_new`, data),
	findSamplingCompletionNew: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/backsupport/findSamplingCompletionNew`,
			data,
			{ loading: true },
		),
	findSamplingCompletion: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/backsupport/findSamplingCompletion`,
			data,
			{ loading: true },
		),
	// 导出
	exportSamplingCompletionNew: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/exportSamplingCompletionNew`,
			{ params: data, isAuth: true, loading: true, responseType: "blob" },
		),

	// /backsupport/findSamplingCompletionNew
	// exportfindSamplingCompletion: data => request.get(`${VUE_APP_ADMIN_API}/backsupport/exportfindSamplingCompletion`,  { params: data, isAuth: true, loading: true, responseType: "blob" }),

	// exportfindSamplingCompletion: (url, data) => request.get(url, data),
	queryCongyeDetail: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/backsupport/queryCongyeDetail`,
			data,
		),
	queryPeopleInfo: (data) =>
		request.post(`${VUE_APP_ADMIN_API}/backsupport/queryPeopleInfo`, data),
	findSysLoginList: (data) =>
		request.get(`${VUE_APP_ADMIN_API}/login/findSysLoginList`, data),
	findIdcardTableList: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/idcard/table/findIdcardTableList`,
			data,
		),
	findLoginUnitList: (data) =>
		request.get(`${VUE_APP_ADMIN_API}/login/unit/findLoginUnitList`, data),
	findHealthCertificateList: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/helpfeed/back/findHealthCertificateList`,
			data,
		),
	findTakePartList: (data) =>
		request.get(`${VUE_APP_ADMIN_API}/take/part/findTakePartList`, data),

	// findCodeTotals: data => request.get(`${VUE_APP_ADMIN_API}/backsupport/findCodeTotals_new`, data),//新接口
	findCodeTotals: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findEnterpriseStatusChart`,
			data,
		), //旧接口

	// findBodyIndustryTotals: data => request.get(`${VUE_APP_ADMIN_API}/backsupport/findBodyIndustryTotals_new`, data),//旧接口
	findBodyIndustryTotals: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findFoodSafetyIndexResponse`,
			data,
		), //新接口

	findFoodPerformanceResponse: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findFoodPerformanceResponse`,
			data,
		), //新接口

	findIsSpecialFoodTotals: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findIsSpecialFoodAndFoodAndBodyIndustryTotals_new`,
			data,
		),
	findStatisticalRegistrations: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findStatisticalRegistrations_new`,
			data,
		),
	// 获取区域公司和人数
	findQuantity: (data) =>
		request.get(`${VUE_APP_ADMIN_API}/backsupport/findQuantity`, data),
	// 获取码的数量
	findHealthStatistics: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findHealthStatistics`,
			data,
		),
	// 获取区域列表
	findListByParentCode: (data) =>
		request.post(`${VUE_APP_ADMIN_API}/area/findListByParentCode`, data),
	// 单位业态备注统计
	findBodyIndustryRemarks: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/backsupport/findBodyIndustryRemarks`,
			data,
		),
	findBodyIndustryRemarksMore: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/backsupport/findBodyIndustryRemarksMore`,
			data,
			{ loading: true },
		),
	// 合计
	findfindRegister: (data) =>
		request.post(`${VUE_APP_ADMIN_API}/backsupport/findfindRegister`, data),
	// 工作站地图
	findWorkstationMapList: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/food/safety/workstation/findWorkstationMapList`,
			data,
		),
	// 导出
	exportQueryWorkstationMap: (data) =>
		request.get(
			`${VUE_APP_ADMIN_API}/food/safety/workstation/exportQueryWorkstationMap`,
			data,
		),

	findWorkNumberOfAreas: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/food/safety/workstation/findWorkNumberOfAreas`,
			data,
		),

	findListByParentCodeA: (data) =>
		request.post(
			`${VUE_APP_ADMIN_API}/sysAreaUnit/findListByParentCode`,
			data,
		),
};

export let findFamousChefDetails = (data) =>
	request.post(`${VUE_APP_ADMIN_API1}/video/map/findFamousChefDetails`, data);

export let findPrincipalResponsibility = (data) =>
	request.get(
		`${VUE_APP_ADMIN_API}/video/map/findPrincipalResponsibility`,
		data,
	);

export let findFamousChef = (data) =>
	request.get(`${VUE_APP_ADMIN_API1}/video/map/findFamousChef`, data);

// let API1='BBB'//春宝本地
// let API1='http://58.211.227.180:9005'//线上

// export let  Get_Pur_Big_Data= data => request.get(`${API}/Get_Pur_Big_Data?access_token=c3puY3A=`, data)
// export let  Get_Quick_Big_Data= data => request.get(`${API}/Get_Quick_Big_Data?access_token=c3puY3A=`, data)
// export let  Get_Pf_Big_Data= data => request.get(`${API}/Get_Pf_Big_Data?access_token=c3puY3A=`, data)
// export let  Get_From_Big_Data= data => request.get(`${API}/Get_From_Big_Data?access_token=c3puY3A=`, data)
// http://58.211.227.180:9005/portals

export let statistics = (data) =>
	request.get(`${VUE_APP_ADMIN_API2}/portals/fj-statistics/statistics`, data);
export let statisticsList = (data) =>
	request.get(`${VUE_APP_ADMIN_API2}/portals/fj-statistics/list`, data);
export let purchasebill = (data) =>
	request.post(`${VUE_APP_ADMIN_API2}/portals/api/purchasebill`, data);

export let statisticsA = (data) =>
	request.get(`${VUE_APP_ADMIN_API2}/portals/statistics/list`, data);

export let unitDistribute = (data) =>
	request.post(`${VUE_APP_ADMIN_API2}/portals/pageHome/unitDistribute`, data);

export let checkAnalyse = (data) =>
	request.post(`${VUE_APP_ADMIN_API2}/portals/pageHome/checkAnalyse`, data);
export let checkAnalyseByUnit = (data) =>
	request.post(
		`${VUE_APP_ADMIN_API2}/portals/pageHome/checkAnalyseByUnit`,
		data,
	);
export let findProblemTop5 = (data) =>
	request.post(
		`${VUE_APP_ADMIN_API2}/portals/pageHome/findProblemTop5`,
		data,
	);
export let checkAnalyseEveryMonth = (data) =>
	request.post(
		`${VUE_APP_ADMIN_API2}/portals/pageHome/checkAnalyseEveryMonth`,
		data,
	);
export let documentForRiskAnalyse = (data) =>
	request.post(
		`${VUE_APP_ADMIN_API2}/portals/pageHome/documentForRiskAnalyse`,
		data,
	);

export let findDailySupervisionStatistics = (data) =>
	request.get(
		`${VUE_APP_ADMIN_API2}/portals/video/map/findDailySupervisionStatistics`,
		data,
	);
export let findDailySupervisionDetails = (data) =>
	request.get(
		`${VUE_APP_ADMIN_API2}/portals/video/map/findDailySupervisionDetails`,
		data,
	);
export let principalResponsibilityDetails = (data) =>
	request.post(
		`${VUE_APP_ADMIN_API}/video/map/principalResponsibilityDetails`,
		data,
	);

//处置预警信息
export let handleVideoSnapped = (data) =>
	request.post(
		`${VUE_APP_ADMIN_API1}/video/snapped/handleVideoSnapped`,
		data,
	);
//上传图片
export const uploadAPI = VUE_APP_BASE_API_RCJD_ZJG + "/upload/pic";
